#!/system/bin/sh
if ! applypatch -c EMMC:/dev/block/platform/msm_sdcc.1/by-name/recovery:12398864:d98bd802235250b2d8bbae49b341cc5886815403; then
  log -t recovery "Installing new recovery image"
  applypatch EMMC:/dev/block/platform/msm_sdcc.1/by-name/boot:10836240:c6935be9e018523f81c5273405aaead605dd8f6d EMMC:/dev/block/platform/msm_sdcc.1/by-name/recovery d98bd802235250b2d8bbae49b341cc5886815403 12398864 c6935be9e018523f81c5273405aaead605dd8f6d:/system/recovery-from-boot.p
else
  log -t recovery "Recovery image already installed"
fi

if [ -e /cache/recovery/command ] ; then
  rm /cache/recovery/command
fi
